﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DTO;
namespace WebClient.admin.Modules.customers
{
    public partial class AddNew : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            this.btnAddNew.Attributes.Add("onclick", "return OnSubmitClick();");
            this.btnCancel.Attributes.Add("onclick", "return ClearAll()");
        }

        private void Additem()
        {
            WebData data = new WebData();
            Customers item = new Customers();          
            item.userId = 4;
            item.fullname = this.txtfullname.Text.Trim();
            item.address = this.txtaddress.Text.Trim();
            item.phone = this.txtphone.Text.Trim();
            item.isActive = 1;//
            data.OnSubmitCustomers(item, 0);
        }
        protected void btnAddNew_Click(object sender, EventArgs e)
        {
            Additem();
        }
    }
}